# Contributor: psykose <alice@ayaya.ev>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=maui
pkgname=fiery
pkgver=1.1.2
pkgrel=0
pkgdesc="KDE Convergent web browser"
url="https://invent.kde.org/maui/fiery"
# all other arches blocked by qt5-qtwebengine
arch="x86_64 x86 aarch64"
license="LicenseRef-KDE-Accepted-LGPL"
makedepends="
	cmake
	extra-cmake-modules
	kcoreaddons5-dev
	ki18n5-dev
	mauikit-dev
	mauikit-filebrowsing-dev
	qt5-qtbase-dev
	qt5-qttools-dev
	qt5-qtwebengine-dev
	samurai
	"
subpackages="$pkgname-lang"
_repo_url="https://invent.kde.org/maui/fiery.git"
source="https://invent.kde.org/maui/fiery/-/archive/v$pkgver/fiery-v$pkgver.tar.gz"
builddir="$srcdir/fiery-v$pkgver"
options="!check" # no tests

provides="kde-sol=$pkgver-r$pkgrel kde-fiery=$pkgver-r$pkgrel"
replaces="kde-sol kde-fiery"

build() {
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
7064c3a2a2bc186cc7daab60400be7816fb0f332572a4c804009bb74a2c0bfd284af015811caa9d860318fe8d14c9e1dbb287423cc8cb59f43bee87202d7f52c  fiery-v1.1.2.tar.gz
"
